<style>
	#user-labels label:after
	{color:white;padding:5px 8px 5px 5px;margin-right:5px;border-radius:2px;}
	@media(max-width: 1000px){
		#user-labels
		{font-size:12px;}
		#user-info-header
		{padding:20px 0;}
		#user-info-header error
		{width:100%;text-align: center;}
		#user-info-header>user_id,#user-info-header>#user-info-headimg
		{flex: 1}
		#user-info-header>#user-info-headimg
		{text-align: right;}
		#admin{display: none}
	}
	@media(min-width: 1000px){
		.username a{color:white;}
		.username a:hover{color:pink;}
	}
</style>
<div class='bc-info' id='user-info-my'  data-port='http://api.hongyanche.com/user/info'>
	<div class='bg-hall-1'>
		<div class='container'>
			<div class='weui-flex' style="align-items: center;">
				<div class='weui-flex__item'>
					<div id='user-info-header' class='weui-flex-center weui-flex-center-xs'>
						<div id='user-info-headimg'>
							<headimgurl info=d><headimgurl info=i><img class='headimg' /></headimgurl></headimgurl>
						</div>
						<user_id info=d>
						<div class='username'><user_name id="user-name" info=1></user_name><p style="font-size:16px;">会员号:<user_id info=1></user_id>&nbsp;&nbsp;</p></div>
						<div id='user-labels'>
							<member info=r>
								<label class='member-__key__'></label>
							</member>
						</div>
						</user_id>
						<error>
							<div class='username'><i class='i i-my' style="font-size: 60px;vertical-align: middle;"></i> <a href='#login'>未登录</a></div>
						</error>
					</div>
				</div>
				<user_id class='hidden-xs' info=d align=right style="display: block;">
				<a href='javascript:void(0);' id="logout">退出登录</a>
				</user_id>
			</div>
		</div>
	</div>
	<div class='container' id = 'admin' style="width:100%">
		{include file="home:my-admin" /}
	</div>
	<div class='weui-flex bc-tab'>
		<div class='weui-flex__item' style='flex:2.5'>
			<div class=' console-panel bg-blur-white'>
				<div class='weui-flex-center'>

					<div class="weui-flex__item bc-tab-menu" style='flex:2'>
						{include file='home:my-tab-menu' /}
					</div>
				</div>
				<style>#client-home-tab-content:before{border:none;}</style>
				<div id='client-home-tab-content' class='bc-tab-content weui-panel weui-panel_access' style="margin-top:50px;">
					{include file='home:my-tab-content' /}
				</div>
			</div>
		</div>
	</div>
	<br/>
</div>
<script type="text/javascript">
$('#user-info-my').on('bc-info-success bc-info-error',function() {
    $.ajax({
        url: 'http://api.hongyanche.com/user/info',
        type: 'POST',
        xhrFields:{
            withCredentials:true
        },
        success: function (data) {
            if (!data.state) {
                location.href = '#login';
            }
        }
    })
})
	function changeFrameHeight(){
		var ifm = document.getElementById('myIframe');
		ifm.height = document.documentElement.clientHeight;
		ifm.width = document.documentElement.clientWidth;
	}
	window.onresize = function(){
		changeFrameHeight();
		
	}

	if(GET('collect')){
	    $('#tab_collect').addClass('bc-tab-active');
        $('#client-home-tab-content > div').hide();
//        nth-child(2)
        $('#client-home-tab-content div:nth-child(5)').show();
	    $('#tab_message').removeClass('bc-tab-active');
	}
	if(GET('order')){
	    $('#tab_order').addClass('bc-tab-active');
	    $('#client-home-tab-content > div').hide();
        $('#client-home-tab-content div:last-child').show();
	    $('#tab_message').removeClass('bc-tab-active')
	}
    if (GET('vehicle')) {
        $('#tab_vehicle').addClass('bc-tab-active');
        $('#tab_message').removeClass('bc-tab-active');
        $('#client-home-tab-content > div').hide();
        $('#client-home-tab-content div:nth-child(2)').show();

	}
</script>